package com.cci.kangdao.service.impl;

import com.cci.kangdao.aop.UserThreadLocal;
import com.cci.kangdao.dao.RegularLocationMapper;
import com.cci.kangdao.dao.model.RegularLocation;
import com.cci.kangdao.dto.BaseResponse;
import com.cci.kangdao.service.RegularLocationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: joe
 * @company: CTY
 * @since: 2024/1/3 15:03
 * @version: V1.0
 **/
@Service
public class RegularLocationServiceImpl implements RegularLocationService {
    @Resource
    private RegularLocationMapper regularLocationMapper;

    @Override
    public BaseResponse getRegularLocationList(String esn) {
        Map<String,Object> map = new HashMap<>();
        map.put("esn",esn);
        map.put("userId", UserThreadLocal.get().getId());
        List<RegularLocation> list = regularLocationMapper.getRegularLocationList(map);
        return BaseResponse.success(list);
    }
}
